package com.kuaimacode.kframework.api.vo.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 用户地址
 */
@Data
//@ApiModel(value="Address-地址")
public class AddressReq  {

    @ApiModelProperty(value = "地址ID，新增不需要上送，更新需要")
    private Long id;

    @Length(max=255, message = "地址超长")
    @NotBlank(message = "地址不能为空")
    @ApiModelProperty(value = "地址")
    private String title;

    @Length(max=30, message = "省市区超长")
    @ApiModelProperty(value = "省市区")
    private String summary;


    @Length(max=255, message = "详细地址超长")
    @NotBlank(message = "详细地址不能为空")
    @ApiModelProperty(value = "详细")
    private String detail;

    @Length(max=100, message = "楼层门牌号超长")
    @ApiModelProperty(value = "楼层门牌号")
    private String doorplate;

    @Length(max=50, message = "经度超长")
    @NotBlank(message = "经度不能为空")
    @ApiModelProperty(value = "经度")
    private String longitude;

    @Length(max=50, message = "纬度超长")
    @NotBlank(message = "纬度不能为空")
    @ApiModelProperty(value = "纬度")
    private String latitude;

    @Length(max=30, message = "姓名超长")
    @ApiModelProperty(value = "姓名")
    private String name;

    @Length(max=20, message = "电话号码超长")
    @ApiModelProperty(value = "电话号码")
    private String phone;

    @NotNull(message = "是否常用地址不能为空")
    @ApiModelProperty(value = "是否常用地址 1-常用 0 不常用")
    private Short usual;
}
